import {createRouter, createWebHistory} from "vue-router";


const routes = [
    {
        path: '',
        name: '',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/MainFrame/index.vue"),
    },
    {
        path: '/',
        name: '/',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/MainFrame/index.vue"),
    },
    {
        path: '/serial/text',
        name: '/serial/text',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/SerialFrame/serialText.vue"),
    },
    {
        path: '/serial/curve',
        name: '/serial/curve',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/SerialFrame/serialCurve.vue"),
    },
    {
        path: '/network/tcpServer',
        name: '/network/tcpServer',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/NetworkFrame/tcpServer.vue"),
    },
    {
        path: '/network/tcpClient',
        name: '/network/tcpClient',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/NetworkFrame/tcpClient.vue"),
    },
    {
        path: '/network/udp',
        name: '/network/udp',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/NetworkFrame/udp.vue"),
    },
    {
        path: '/notebook',
        name: '/notebook',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/NoteFrame/notebook.vue"),
    },
    {
        path: '/game/snake',
        name: '/game/snake',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/GameFrame/snake.vue"),
    },
    {
        path: '/game/2048',
        name: '/game/2048',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/GameFrame/2048.vue"),
    },
    {
        path: '/about',
        name: '/about',
        meta: {
            keepAlive: true
        },
        component: () => import("../components/AboutFrame/about.vue"),
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})
export default router
